home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scclocale.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-05-30  |  1011 b   |  56 lines

  1. //
  2. // C++ Interface: sclocale
  3. //
  4. // Description: 
  5. //
  6. //
  7. // Author: Pierre Marchand <pierremarc@oep-h.com>, (C) 2009
  8. //
  9. // Copyright: See COPYING file that comes with this distribution
  10. //
  11. //
  12.  
  13. #ifndef SCCLOCALE_H
  14. #define SCCLOCALE_H
  15.  
  16. #include <QLocale>
  17. #include <QString>
  18.  
  19. #include <clocale>
  20. #if defined(Q_OS_MAC)
  21. #include <xlocale.h>
  22. #endif
  23.  
  24. #if defined(Q_WS_WIN)
  25. #define XLocaleType _locale_t
  26. #else
  27. #define XLocaleType locale_t
  28. #endif
  29.  
  30. #include "scribusapi.h"
  31.  
  32. class SCRIBUS_API ScCLocale
  33. {
  34.     ScCLocale();
  35.     ~ScCLocale();
  36.     QLocale qLocale;
  37.     XLocaleType cLocale;
  38.  
  39.     static ScCLocale * m_instance;
  40.     static ScCLocale * that();
  41.     
  42.     public:
  43.         static double toDoubleC(const QString& str, bool * ok = 0);
  44.         static double toDoubleC(const QString& str, double defValue);
  45.         static float toFloatC(const QString& str, bool * ok = 0);
  46.         static float toFloatC(const QString& str, float defValue);
  47.         static QString toQStringC(double d);
  48.         static double strtod ( const char * str, char ** endptr );
  49.         
  50. };
  51.  
  52. #endif // SCCLOCALE_H
  53.  
  54.  
  55.  
  56.